<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">

<head th:include="include :: header"></head>

<style>

    #brand .closeBtn, #columnPictureImg {
        display: inline-block;
        margin-right: 25px;
        margin-bottom: 25px;
        position: relative;
    }

    #brand .closeBtn, #QRcodeImg {
        display: inline-block;
        margin-right: 25px;
        margin-bottom: 25px;
        position: relative;
    }

    .iconcloseImg {
        position: absolute;
        top: -10px;
        right: -10px;
    }
</style>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训类型：</label>
                            <div class="col-sm-8">
                                <select name="examType" class="form-control" id="examType">
<!--                                    <option value="0">1+X幼儿照护职业技能等级证书师资及考评员</option>-->
<!--                                    <option value="1">1+X幼儿照护职业技能等级证书高级师资及考评员</option>-->
<!--                                    <option value="2">1+X幼儿照护职业技能等级证书考评员到期复审换证</option>-->
<!--                                    <option value="3">1+X产后恢复职业技能等级证书师资及考评员</option>-->
<!--                                    <option value="4">1+X幼儿照护、产后恢复职业技能等级证书考务技术与督导员</option>-->
<!--                                    <option value="5">高职护理——江西国培</option>-->
<!--                                    <option value="6">中职幼儿保育——江西国培</option>-->
<!--                                    <option value="7">教学能力竞赛研修班</option>-->
<!--                                    <option value="8">金砖大赛-第二届婴幼儿照护训练营</option>-->
<!--                                    <option value="9">金砖大赛-首届产后恢复训练营</option>-->
<!--                                    <option value="10">2024年国培省培班</option>-->
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训标题：</label>
                            <div class="col-sm-8">
                                <input id="description" name="noticeTitle" placeholder="请输入培训标题"
                                       class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">文件号：</label>
                            <div class="col-sm-8">
                                <input name="fileNumber" placeholder="请输入文件号" class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训总人数：</label>
                            <div class="col-sm-8">
                                <input id="traintotal" name="totalTrainees" placeholder="请输入培训总数"
                                       class="form-control" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">报名时间：</label>
                            <div class="col-sm-8">

                                <div class="layui-inline" id="times">
                                    <div class="layui-input-inline">
                                        <input type="text" name="registrationStartDate" id="registrationStartDate"
                                               class="layui-input" placeholder="开始日期">
                                    </div>
                                    <div class="layui-input-inline"> ~</div>
                                    <div class="layui-input-inline">
                                        <input type="text" name="registrationEndDate" id="registrationEndDate"
                                               class="layui-input" placeholder="结束日期">
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">班会时间：</label>
                            <div class="col-sm-8">
                                <input id="classMeetingDate" name="classMeetingDate" class="form-control" type="text"
                                       placeholder="班会时间">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训时间：</label>
                            <div class="col-sm-8">

                                <div class="layui-inline" id="timesOut">
                                    <div class="layui-input-inline">
                                        <input type="text" name="trainingStartDate" id="trainingStartDate"
                                               class="layui-input" placeholder="开始日期">
                                    </div>
                                    <div class="layui-input-inline"> ~</div>
                                    <div class="layui-input-inline">
                                        <input type="text" name="trainingEndDate" id="trainingEndDate"
                                               class="layui-input" placeholder="结束日期">
                                    </div>
                                </div>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">结业时间：</label>
                            <div class="col-sm-8">
                                <input id="graduationDate" name="graduationDate" class="form-control"
                                       placeholder="结业时间" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">班主任：</label>
                            <div class="col-sm-8">
                                <input name="classTeacher" class="form-control" placeholder="班主任" type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">联系方式：</label>
                            <div class="col-sm-8">
                                <input name="teacherPhone" class="form-control" placeholder="联系方式" maxlength="11"
                                       type="text">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训形式：</label>

                            <div class="col-sm-8">
                                <select name="trainingForm" id="trainingForm" class="form-control" required>
                                    <option value="">请选择</option>
                                    <option value="1">线上培训</option>
                                    <option value="2">线下培训</option>
                                </select>
                            </div>

                        </div>

                        <div class="form-group" id="address" style="display: none">
                            <label class="col-sm-3 control-label">培训地址：</label>
                            <div class="col-sm-8">

                                <div id="l-map"></div>
                                <div id="r-result"><input type="text" id="suggestId" size="20" class="form-control"
                                                          name="trainingAddress"/></div>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训形式说明：</label>
                            <div class="col-sm-8">
                                <input id="trainingExplain" name="trainingExplain" type="hidden">
                                <div class="ibox-content no-padding">
                                    <div id="trainingForm_sn" class="brandCharacteristics editor"></div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">培训介绍：</label>
                            <div class="col-sm-8">
                                <input id="examIntro" name="examIntro" type="hidden">
                                <div class="ibox-content no-padding">
                                    <div id="content_sn" class="brandCharacteristics editor"></div>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">栏目图：</label>
                            <div class="col-sm-8">

                                <div id="columnPictureImg"></div>

                                <input id="columnPicture" name="columnPicture" type="hidden">
                                <button type="button" class="btn btn-success" id="columnPictureAdd"
                                        style="margin-top: 10px;">
                                    <i class="fa fa-cloud"></i>上传栏目图
                                </button>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">附件：</label>
                            <div class="col-sm-8">

                                <div id="brand"></div>

                                <input id="trainingPdf" name="trainingPdf" type="hidden">
                                <input id="fileName" name="fileName" type="hidden">
                                <button type="button" class="btn btn-success" id="btnAdd" style="margin-top: 10px;">
                                    <i class="fa fa-cloud"></i>上传附件
                                </button>

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">群二维码：</label>
                            <div class="col-sm-8">
                                <div id="QRcodeImg"></div>
                                <input id="qrCode" name="qrCode" type="hidden">
                                <button type="button" class="btn btn-success" id="QRcodeAdd" style="margin-top: 10px;">
                                    <i class="fa fa-cloud"></i>上传二维码
                                </button>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>

<script src="//s.xlongwei.com/res/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/webJs/jzweb/examRegistration/add.js"></script>
<script type="text/javascript"
        src="https://api.map.baidu.com/getscript?v=3.0&ak=AqBSmvbrl4d9faHZVgMEKBwLSi8Qw491&services=&t=20230317105246"></script>

<script>

    var map = new BMap.Map("l-map");

    var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
        {
            "input": "suggestId"
            , "location": map
        });

    ac.addEventListener("onhighlight", function (e) {  //鼠标放在下拉列表上的事件
        var str = "";
        var _value = e.fromitem.value;
        var value = "";
        if (e.fromitem.index > -1) {
            value = _value.province + _value.city + _value.district + _value.street + _value.business;
        }
        str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;

        value = "";
        if (e.toitem.index > -1) {
            _value = e.toitem.value;
            value = _value.province + _value.city + _value.district + _value.street + _value.business;
        }

    });

    var myValue;
    ac.addEventListener("onconfirm", function (e) {    //鼠标点击下拉列表后的事件
        var _value = e.item.value;
        myValue = _value.province + _value.city + _value.district + _value.street + _value.business;
    });
    var prefix = "/common/sysDict";
    function sysDictList() {
        $.ajax({
            url: prefix + "/list",
            cache: true,
            type: "get",
            data: {
                type: 'examType'
            },// 你的formid
            async: false,
            success: function (r) {
                console.log()
                r.forEach(item => {
                    $('#examType').append(`
                            <option value="${item.value}">
                                ${item.name}
                            </option>`)
                });
            }
        });
    }

    $().ready(function () {
        sysDictList()
    });
</script>

</body>

</html>